﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
    ViewBag.Title = "添加报单";
}

@section Top {
    @Html.Partial("_Top")
}
<link href="~/LinScript/bootstrap-validator/bootstrapValidator.min.css" rel="stylesheet" />
<div class="container-fluid">
    <!-- Breadcrumbs-->
    <ol class="breadcrumb">
        <li class="breadcrumb-item">
            报单管理
        </li>
        <li class="breadcrumb-item active">添加报单</li>
    </ol>
    <div class="card card-register mx-auto mt-5 mb-5">
        <div class="card-header">添加报单</div>
        <div class="card-body">
            <form class="addOrder">
                <div class="form-group">
                    <label for="seller" class="text-primary">推荐人编号</label>
                    <input class="form-control" id="sellerNumber" type="text" name="sellerNumber" aria-describedby="sellerNumber" placeholder="请输入编号">
					<span style="margin-left:5px;" id="tuijianren">请输入推荐人编号</span>
                </div>
                <div class="form-group">
                    <div class="form-row">
                        <div class="col-md-6">
                            <label for="purchaser" class="text-primary">买方昵称</label>
                            <input class="form-control" id="purchaserName" type="text" name="purchaser" aria-describedby="purchaser" placeholder="请输入昵称">
                        </div>
                        <div class="col-md-6">
                            <label for="purchaserTel" class="text-primary">买方联系电话</label>
                            <input class="form-control" id="purchaserTel" type="text" name="purchaserTel" aria-describedby="purchaserTel" placeholder="请输入电话">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label for="emoneySuperior" class="text-primary">买家地址</label>
                    <div class="form-row">
                        <div class="col-md-1 text-center" style="line-height:2.3rem">
                            <label for="expSuperior" class="mb-0">省</label>
                        </div>
                        <div class="col-md-3">
                            <select class="form-control selectpicker" name="province" id="province">
                                
                            </select>
                        </div>
                        <div class="col-md-1 text-center" style="line-height:2.3rem">
                            <label for="expSuperior" class="mb-0">市</label>
                        </div>
                        <div class="col-md-3">
                            <select class="form-control selectpicker" name="city" id="city">
                                
                            </select>
                        </div>
                        <div class="col-md-1 text-center" style="line-height:2.3rem">
                            <label for="expSuperior" class="mb-0">区/县</label>
                        </div>
                        <div class="col-md-3">
                            <select class="form-control selectpicker" name="district" id="district">
                                
                            </select>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label for="detailedSite" class="text-primary">买家详细地址</label>
                    <input class="form-control" id="detailedSite" type="text" name="detailedSite" aria-describedby="detailedSite" placeholder="请输入详细地址">
                </div>

                <div class="form-group">
                    <div class="clearfix mb-2">
                        <label for="emoneySuperior" class="text-primary mb-0" style="vertical-align:sub">添加产品<strong class="small text-danger"> *完善信息后点击添加按钮</strong></label>
                        <button class="btn btn-default btn-sm pull-right" onclick="addPro()" type="button"><i class="fa fa-plus" aria-hidden="true"></i> 添加</button>
                    </div>
                    <div class="form-row">
                        <div class="col-md-2 text-center" style="line-height:2.3rem">
                            <label for="proName" class="mb-0">选择产品</label>
                        </div>
                        <div class="col-md-4">
                            <select class="form-control selectpicker" name="district" id="proName">
                                @foreach (var item in ViewBag.ProductList)
                                {
                                    <option value="@item.Money" data-ProNo="@item.ProNo" >@item.Name</option>
                                }
                            </select>
                        </div>
                        <div class="col-md-2 text-center" style="line-height:2.3rem">
                            <label for="proName" class="mb-0">产品数量</label>
                        </div>
                        <div class="col-md-4">
                            <input class="form-control" id="proMumber" type="number" name="proMumber" aria-describedby="expSuperior" placeholder="请输入产品数量">
                        </div>
                    </div>
                </div>
                @* 产品面板 *@
                <div class="form-group" id="panel" style="display:none">
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <h3 class="panel-title">添加的产品</h3>
                        </div>
                        <table class="table mb-0 table-bordered Pro-table text-center" id="ProData">
                            <thead>
                                <tr>
                                    <th>产品编号</th>
                                    <th>产品名字</th>
                                    <th>产品价格</th>
                                    <th>产品数量</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div>
                </div>
                
				<div class="form-group">
					<label for="detailedSite" class="text-primary">交易流水</label>
					<input class="form-control" id="Wather" type="text" name="Wather" aria-describedby="Wather" placeholder="请输入交易流水">
				</div>
                <div class="form-group">
                    <label for="seller" class="text-primary">备注:</label>
                    <textarea class="form-control" rows="3" id="Remarks" name="Remarks"></textarea>
                </div>
                <a class="btn btn-primary btn-block" href="javascript:void(0)" onclick="submit()">提交</a>
            </form>
           
        </div>
    </div>
</div>
<script src="~/Scripts/CityJson.js"></script>
<script src="~/LinScript/bootstrap-validator/bootstrapValidator.min.js"></script>
<script src="~/LinScript/bootstrap-validator/zh_CN.js"></script>
<script src="~/Scripts/sb-admin.js"></script>
<script src="~/Scripts/addOrder.js"></script>

